<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ContractorModel extends BaseModel
{
    //
    protected $table = 'contractor';

    public function getContractorStartTimeAttribute($value)
    {
        return date('Y-m-d H:i:s', $value);
    }

    public function getContractorEndTimeAttribute($value)
    {
        return date('Y-m-d H:i:s', $value);
    }

    /**
     * Prepare a date for array / JSON serialization.
     *
     * @param \DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
}
